/*******************************************************************************
* Copyright (c) 2010, 2018 西安秦晔信息科技有限公司
* Licensed under the Apache License, Version 2.0 (the "License");
*    you may not use this file except in compliance with the License.
*    You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*    Unless required by applicable law or agreed to in writing, software
*    distributed under the License is distributed on an "AS IS" BASIS,
*    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*    See the License for the specific language governing permissions and
*    limitations under the License.
*******************************************************************************/
package com.qinyeit.serviceapp.entity;

import com.qinyeit.serviceapp.entity.enums.State;
import com.qinyetech.springstage.core.entity.AbstractEntity;

import javax.persistence.Transient;
import javax.validation.constraints.NotEmpty;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Builder;
import lombok.experimental.Tolerate;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * ClassName: DishesMenu <br/>
 * Function: 菜谱 <br/>
 * date: 2018-11-26 10:29:38 <br/>
 *
 * @author liuwenjin
 * @version  1.0
 * @since JDK 1.8
 */
@Builder
@Entity
@Table(name="dishes_menus")
public class DishesMenu extends MerchantGroupBaseEntity<Long> {

	private static final long serialVersionUID = 1L;

	// 名称 
    @Column(name="name", length = 300)
	private String name = null;

	// 生效日期 
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
    @Column(name="effective_time")
	private Date effectiveTime = null;

	// 菜品库id 
    @Column(name="store_id")
	private Long storeId = null;

	// 操作人 
    @Column(name="operator_name", length = 300)
	private String operatorName = null;

	// 操作日期 
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
    @Column(name="operate_time")
	private Date operateTime = null;

	// 状态 
    @Column(name="state", length = 300)
	private State state = State.NORMAL;

    //下发菜品明细[菜品id 逗号分隔]
    @Column(name = "dishes_details")
	private String dishesDetails = "";

    //下发原料明细[原料id 逗号分隔]
    @Column(name = "material_details")
	private String materialDetails = "";

    //是否下发成本卡 true 下发 false 不下发
    @Column(name = "cost_card")
	private Boolean costCard = false;


    @Transient
	private String branchs= "";
    @Transient
	private String branchIndustry= "";
    @Transient
	private String account= "";
//    @Transient
//	private String state= "";

    @Tolerate
	public DishesMenu() {
		
	}
    @Tolerate
	public DishesMenu(Long id){
    	super.setId(id);
    }
	
	/**
	 * 获取名称
	 */
	public String getName() {
		return this.name;
	}

    /**
     * 设置名称
     */
	public DishesMenu setName(String name) {
		this.name = name;
		return this;
	}

	/**
	 * 获取生效日期
	 */
	public Date getEffectiveTime() {
		return this.effectiveTime;
	}

    /**
     * 设置生效日期
     */
	public DishesMenu setEffectiveTime(Date effectiveTime) {
		this.effectiveTime = effectiveTime;
		return this;
	}

	/**
	 * 获取菜品库id
	 */
	public Long getStoreId() {
		return this.storeId;
	}

    /**
     * 设置菜品库id
     */
	public DishesMenu setStoreId(Long storeId) {
		this.storeId = storeId;
		return this;
	}

	/**
	 * 获取操作人
	 */
	public String getOperatorName() {
		return this.operatorName;
	}

    /**
     * 设置操作人
     */
	public DishesMenu setOperatorName(String operatorName) {
		this.operatorName = operatorName;
		return this;
	}

	/**
	 * 获取操作日期
	 */
	public Date getOperateTime() {
		return this.operateTime;
	}

    /**
     * 设置操作日期
     */
	public DishesMenu setOperateTime(Date operateTime) {
		this.operateTime = operateTime;
		return this;
	}

	public State getState() {
		return state;
	}

	public void setState(State state) {
		this.state = state;
	}

	public String getBranchs() {
		return branchs;
	}

	public void setBranchs(String branchs) {
		this.branchs = branchs;
	}

	public String getDishesDetails() {
		return dishesDetails;
	}

	public void setDishesDetails(String dishesDetails) {
		this.dishesDetails = dishesDetails;
	}

	public String getMaterialDetails() {
		return materialDetails;
	}

	public void setMaterialDetails(String materialDetails) {
		this.materialDetails = materialDetails;
	}

	public Boolean getCostCard() {
		return costCard;
	}

	public void setCostCard(Boolean costCard) {
		this.costCard = costCard;
	}

	public String getBranchIndustry() {
		return branchIndustry;
	}

	public void setBranchIndustry(String branchIndustry) {
		this.branchIndustry = branchIndustry;
	}

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}
}
